package com.cf.model;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.io.Serializable;
import java.util.Date;

/**
 * wxredpacket-RedPacketGame
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info 红包游戏 model
 * @since 2018/1/9 10:38
 */
@Entity
public class RedPacketGame implements Serializable {

    @Id
    private String id;

    //所属用户
    private Long userId;

    //红包的金额，单位是分
    private Long money = 0l;

    //红包的描述
    private String info = "";

    //钱是否到账
    private Boolean payed = false;

    //红包的个数
    private Integer redPacketNum = 1;

    //创建时间
    @Temporal(value = TemporalType.TIMESTAMP)
    private Date createTime;

    //难度
    private Integer hardType = HardType.COMMON.getHardType();

    //游戏类型
    private Integer gameType = GameType.DJLZC.getGameType();

    //红包类型
    private Integer redPacketType = RedPacketType.COMMON.getRedPacketType();

    public static enum GameType {

        DJLZC("大家来找茬", 0);

        private String name;
        private Integer gameType;


        GameType(String name, Integer gameType) {
            this.name = name;
            this.gameType = gameType;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getGameType() {
            return gameType;
        }

        public void setGameType(Integer gameType) {
            this.gameType = gameType;
        }
    }

    public static enum HardType {
        EASY("简单", 0), COMMON("正常", 1), HARD("困难", 2), SUPERHARD("变态", 3);

        private String name;

        private Integer hardType;

        HardType(String name, Integer hardType) {
            this.name = name;
            this.hardType = hardType;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getHardType() {
            return hardType;
        }

        public void setHardType(Integer hardType) {
            this.hardType = hardType;
        }
    }

    public static enum RedPacketType {
        COMMON("普通", 0), RANDOM("随机", 1);

        private String name;

        private Integer redPacketType;

        RedPacketType(String name, Integer redPacketType) {
            this.name = name;
            this.redPacketType = redPacketType;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getRedPacketType() {
            return redPacketType;
        }

        public void setRedPacketType(Integer redPacketType) {
            this.redPacketType = redPacketType;
        }
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getMoney() {
        return money;
    }

    public void setMoney(Long money) {
        this.money = money;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public Boolean getPayed() {
        return payed;
    }

    public void setPayed(Boolean payed) {
        this.payed = payed;
    }

    public Integer getRedPacketNum() {
        return redPacketNum;
    }

    public void setRedPacketNum(Integer redPacketNum) {
        this.redPacketNum = redPacketNum;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getHardType() {
        return hardType;
    }

    public void setHardType(Integer hardType) {
        this.hardType = hardType;
    }

    public Integer getGameType() {
        return gameType;
    }

    public void setGameType(Integer gameType) {
        this.gameType = gameType;
    }

    public Integer getRedPacketType() {
        return redPacketType;
    }

    public void setRedPacketType(Integer redPacketType) {
        this.redPacketType = redPacketType;
    }
}
